#!/bin/bash
echo '!Warning: Delete an user will remove its home dir.'
echo '> Enter ftp username:'
read ftp_user

echo 'Delete user *' $ftp_user '*(Y|n)?'
read input_confirm 

if [ "$input_confirm"x != "Y"x ]; then
  exit 0
fi

user_home=/home/www/html/$ftp_user

#mv home dir
mv $user_home /delete

#delete system user
userdel $ftp_user

echo ''
echo '> Compeleted!' $ftp_user 'has been deleted.'